package com.margo.project.web.mvcconfig.viewresolver;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.View;

/**
 * https://blog.csdn.net/turbo_zone/article/details/84571503
 * @author fangxingbang
 *
 */
public class MargoView implements View{
	
	public String getContentType() {
		return "text/html";
	}

	@Override
	public void render(Map<String, ?> model, HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		for(Map.Entry<String, ?> entry : model.entrySet()) {
            response.getWriter().write(entry.getKey() + " " + entry.getValue());
        }
		
	}

}
